

package com.jc.platform.contractzwl.mapper;

import org.apache.ibatis.annotations.Param;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jc.platform.contractzwl.entity.PurchaseContractEntity;
import org.apache.ibatis.annotations.*;
import org.mapstruct.MappingTarget;

/**
 * ClassName PurchaseContractMapper.java
 * Description 采购合同
 *
 * @author zwl
 * @version 9.0
 * @date 2021/08/07
 */
@Mapper
public interface IPurchaseContractMapper extends BaseMapper<PurchaseContractEntity>
{

    /**
     * 根据流程实例ID获取对象
     * @param processInstanceId
     * @return
     */
    @Select("select * from purchase_contract where process_instance_id = #{processInstanceId}")
    PurchaseContractEntity findPurchaseContractByProcessInstanceId(@Param("processInstanceId") String processInstanceId);

    int getCountByParther(Long partherId);

    int addParther(@Param("contractId")Long contractId,@Param("partherId")Long partherId);

    int removeParther(@Param("contractId")Long contractId,@Param("partherId")Long[] partherId);

    int removeAllParther(Long contractId);



}




